import cv2
from ocr_process.rec.text_pipline import TextPipeline

if __name__ == '__main__':
    text_pipeline = TextPipeline(det_model_path=r"D:\ocr\onnx\deploy\text_system\det_1.0.0\inference.onnx",
                                 rec_model_path=r"D:\ocr\onnx\deploy\text_system\rec_1.0.0\inference.onnx", use_openvino=True)
    image_data = cv2.imread("1.jpg", cv2.IMREAD_COLOR)
    input_data = {"original_image": image_data, "image": image_data.copy()}
    text_tesult = text_pipeline(input_data)
    print(text_tesult)
